3.17 \(\int \frac{\sin ^6(x)}{a+b \cos ^2(x)} \, dx\)

Optimal. Leaf size=88 \[ -\frac{x \left (8 a^2+20 a b+15 b^2\right )}{8 b^3}+\frac{(4 a+7 b) \sin (x) \cos (x)}{8 b^2}-\frac{(a+b)^{5/2} \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{\sqrt{a} b^3}+\frac{\sin ^3(x) \cos (x)}{4 b} \]

[Out]

-((8*a^2 + 20*a*b + 15*b^2)*x)/(8*b^3) - ((a + b)^(5/2)*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(Sqrt[a]*b^3) +
((4*a + 7*b)*Cos[x]*Sin[x])/(8*b^2) + (Cos[x]*Sin[x]^3)/(4*b)

________________________________________________________________________________________

Rubi [A]  time = 0.181215, antiderivative size = 88, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {3191, 414, 527, 522, 203, 205} \[ -\frac{x \left (8 a^2+20 a b+15 b^2\right )}{8 b^3}+\frac{(4 a+7 b) \sin (x) \cos (x)}{8 b^2}-\frac{(a+b)^{5/2} \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{\sqrt{a} b^3}+\frac{\sin ^3(x) \cos (x)}{4 b} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]^6/(a + b*Cos[x]^2),x]

[Out]

-((8*a^2 + 20*a*b + 15*b^2)*x)/(8*b^3) - ((a + b)^(5/2)*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(Sqrt[a]*b^3) +
((4*a + 7*b)*Cos[x]*Sin[x])/(8*b^2) + (Cos[x]*Sin[x]^3)/(4*b)

Rule 3191

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 414

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*x*(a + b*x^n)^(p + 1)*(
c + d*x^n)^(q + 1))/(a*n*(p + 1)*(b*c - a*d)), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1)*
(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d,
 n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomial
Q[a, b, c, d, n, p, q, x]

Rule 527

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d
)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)
*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sin ^6(x)}{a+b \cos ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right )^3 \left (a+(a+b) x^2\right )} \, dx,x,\cot (x)\right )\\ &=\frac{\cos (x) \sin ^3(x)}{4 b}-\frac{\operatorname{Subst}\left (\int \frac{a+4 b-3 (a+b) x^2}{\left (1+x^2\right )^2 \left (a+(a+b) x^2\right )} \, dx,x,\cot (x)\right )}{4 b}\\ &=\frac{(4 a+7 b) \cos (x) \sin (x)}{8 b^2}+\frac{\cos (x) \sin ^3(x)}{4 b}-\frac{\operatorname{Subst}\left (\int \frac{4 a^2+9 a b+8 b^2-(a+b) (4 a+7 b) x^2}{\left (1+x^2\right ) \left (a+(a+b) x^2\right )} \, dx,x,\cot (x)\right )}{8 b^2}\\ &=\frac{(4 a+7 b) \cos (x) \sin (x)}{8 b^2}+\frac{\cos (x) \sin ^3(x)}{4 b}-\frac{(a+b)^3 \operatorname{Subst}\left (\int \frac{1}{a+(a+b) x^2} \, dx,x,\cot (x)\right )}{b^3}+\frac{\left (8 a^2+20 a b+15 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\cot (x)\right )}{8 b^3}\\ &=-\frac{\left (8 a^2+20 a b+15 b^2\right ) x}{8 b^3}-\frac{(a+b)^{5/2} \tan ^{-1}\left (\frac{\sqrt{a+b} \cot (x)}{\sqrt{a}}\right )}{\sqrt{a} b^3}+\frac{(4 a+7 b) \cos (x) \sin (x)}{8 b^2}+\frac{\cos (x) \sin ^3(x)}{4 b}\\ \end{align*}

Mathematica [A]  time = 0.187739, size = 77, normalized size = 0.88 \[ \frac{-4 x \left (8 a^2+20 a b+15 b^2\right )+8 b (a+2 b) \sin (2 x)+\frac{32 (a+b)^{5/2} \tan ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a+b}}\right )}{\sqrt{a}}-b^2 \sin (4 x)}{32 b^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]^6/(a + b*Cos[x]^2),x]

[Out]

(-4*(8*a^2 + 20*a*b + 15*b^2)*x + (32*(a + b)^(5/2)*ArcTan[(Sqrt[a]*Tan[x])/Sqrt[a + b]])/Sqrt[a] + 8*b*(a + 2
*b)*Sin[2*x] - b^2*Sin[4*x])/(32*b^3)

________________________________________________________________________________________

Maple [B]  time = 0.033, size = 194, normalized size = 2.2 \begin{align*}{\frac{{a}^{3}}{{b}^{3}}\arctan \left ({a\tan \left ( x \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}}+3\,{\frac{{a}^{2}}{{b}^{2}\sqrt{ \left ( a+b \right ) a}}\arctan \left ({\frac{a\tan \left ( x \right ) }{\sqrt{ \left ( a+b \right ) a}}} \right ) }+3\,{\frac{a}{b\sqrt{ \left ( a+b \right ) a}}\arctan \left ({\frac{a\tan \left ( x \right ) }{\sqrt{ \left ( a+b \right ) a}}} \right ) }+{\arctan \left ({a\tan \left ( x \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}}+{\frac{ \left ( \tan \left ( x \right ) \right ) ^{3}a}{2\,{b}^{2} \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) ^{2}}}+{\frac{9\, \left ( \tan \left ( x \right ) \right ) ^{3}}{8\,b \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) ^{2}}}+{\frac{a\tan \left ( x \right ) }{2\,{b}^{2} \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) ^{2}}}+{\frac{7\,\tan \left ( x \right ) }{8\,b \left ( \left ( \tan \left ( x \right ) \right ) ^{2}+1 \right ) ^{2}}}-{\frac{\arctan \left ( \tan \left ( x \right ) \right ){a}^{2}}{{b}^{3}}}-{\frac{5\,\arctan \left ( \tan \left ( x \right ) \right ) a}{2\,{b}^{2}}}-{\frac{15\,\arctan \left ( \tan \left ( x \right ) \right ) }{8\,b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^6/(a+b*cos(x)^2),x)

[Out]

1/b^3/((a+b)*a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/2))*a^3+3/b^2/((a+b)*a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/
2))*a^2+3/b/((a+b)*a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/2))*a+1/((a+b)*a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/
2))+1/2/b^2/(tan(x)^2+1)^2*tan(x)^3*a+9/8/b/(tan(x)^2+1)^2*tan(x)^3+1/2/b^2/(tan(x)^2+1)^2*tan(x)*a+7/8/b/(tan
(x)^2+1)^2*tan(x)-1/b^3*arctan(tan(x))*a^2-5/2/b^2*arctan(tan(x))*a-15/8/b*arctan(tan(x))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^6/(a+b*cos(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.93262, size = 702, normalized size = 7.98 \begin{align*} \left [\frac{2 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt{-\frac{a + b}{a}} \log \left (\frac{{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \,{\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (x\right )^{2} - 4 \,{\left ({\left (2 \, a^{2} + a b\right )} \cos \left (x\right )^{3} - a^{2} \cos \left (x\right )\right )} \sqrt{-\frac{a + b}{a}} \sin \left (x\right ) + a^{2}}{b^{2} \cos \left (x\right )^{4} + 2 \, a b \cos \left (x\right )^{2} + a^{2}}\right ) -{\left (8 \, a^{2} + 20 \, a b + 15 \, b^{2}\right )} x -{\left (2 \, b^{2} \cos \left (x\right )^{3} -{\left (4 \, a b + 9 \, b^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{8 \, b^{3}}, -\frac{4 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt{\frac{a + b}{a}} \arctan \left (\frac{{\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a\right )} \sqrt{\frac{a + b}{a}}}{2 \,{\left (a + b\right )} \cos \left (x\right ) \sin \left (x\right )}\right ) +{\left (8 \, a^{2} + 20 \, a b + 15 \, b^{2}\right )} x +{\left (2 \, b^{2} \cos \left (x\right )^{3} -{\left (4 \, a b + 9 \, b^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{8 \, b^{3}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^6/(a+b*cos(x)^2),x, algorithm="fricas")

[Out]

[1/8*(2*(a^2 + 2*a*b + b^2)*sqrt(-(a + b)/a)*log(((8*a^2 + 8*a*b + b^2)*cos(x)^4 - 2*(4*a^2 + 3*a*b)*cos(x)^2
- 4*((2*a^2 + a*b)*cos(x)^3 - a^2*cos(x))*sqrt(-(a + b)/a)*sin(x) + a^2)/(b^2*cos(x)^4 + 2*a*b*cos(x)^2 + a^2)
) - (8*a^2 + 20*a*b + 15*b^2)*x - (2*b^2*cos(x)^3 - (4*a*b + 9*b^2)*cos(x))*sin(x))/b^3, -1/8*(4*(a^2 + 2*a*b
+ b^2)*sqrt((a + b)/a)*arctan(1/2*((2*a + b)*cos(x)^2 - a)*sqrt((a + b)/a)/((a + b)*cos(x)*sin(x))) + (8*a^2 +
 20*a*b + 15*b^2)*x + (2*b^2*cos(x)^3 - (4*a*b + 9*b^2)*cos(x))*sin(x))/b^3]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**6/(a+b*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.19013, size = 161, normalized size = 1.83 \begin{align*} -\frac{{\left (8 \, a^{2} + 20 \, a b + 15 \, b^{2}\right )} x}{8 \, b^{3}} + \frac{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )}{\left (\pi \left \lfloor \frac{x}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (a\right ) + \arctan \left (\frac{a \tan \left (x\right )}{\sqrt{a^{2} + a b}}\right )\right )}}{\sqrt{a^{2} + a b} b^{3}} + \frac{4 \, a \tan \left (x\right )^{3} + 9 \, b \tan \left (x\right )^{3} + 4 \, a \tan \left (x\right ) + 7 \, b \tan \left (x\right )}{8 \,{\left (\tan \left (x\right )^{2} + 1\right )}^{2} b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^6/(a+b*cos(x)^2),x, algorithm="giac")

[Out]

-1/8*(8*a^2 + 20*a*b + 15*b^2)*x/b^3 + (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*(pi*floor(x/pi + 1/2)*sgn(a) + arctan(a
*tan(x)/sqrt(a^2 + a*b)))/(sqrt(a^2 + a*b)*b^3) + 1/8*(4*a*tan(x)^3 + 9*b*tan(x)^3 + 4*a*tan(x) + 7*b*tan(x))/
((tan(x)^2 + 1)^2*b^2)